class Section < ActiveRecord::Base
  self.table_name = "sections"
  include ActiveModel::Validations
  validates :section_name, presence: true

    # default for will_paginate
    self.per_page = 10


   filterrific(
        available_filters: [
            :with_section_name
        ]
    )

    scope :with_section_name, lambda { |ref_section_name|
          return nil  if ref_section_name.blank?
          where('sections.section_name like ?', '%' + ref_section_name.to_s + '%')
      }

end
